package com.ysxsoft.wdg.bean.zy;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class GoodsBean implements Parcelable{


    /**
     * id : 48
     * name : 我的乖应用平台经营创客999元
     * categoryid : 59
     * price : 999.00
     * l_price : 999.00
     * sold : 0
     * detail :
     * status : 1
     * addtime : 1540967090
     * pic : http://wdg.sanzhima.cn/oa/public/static/admin/img/none.png
     * ishot : 1
     * p_ruleid : 11
     * p_rule_name : 会员
     * rebate : 0.00
     * profit : 999.00
     * picture : 580
     * yun : 0.00
     * share :
     * store : 981
     */

    private int sou;
    private List<String> pictures;
    private String id;
    private String name;
    private String categoryid;
    private String price;
    private String l_price;
    private String sold;
    private String detail;
    private int status;
    private String addtime;
    private String pic;
    private int ishot;
    private String p_ruleid;
    private String p_rule_name;
    private String rebate;
    private String profit;
    private String picture;
    private String yun;
    private String share;
    private String store;
    private String hui;
    private String rule_name;
    private String ruleid;
    private String product_rule_id;
    private String total;
    private int num;
    private String companyid;

    public String getCompanyid() {
        return companyid == null ? "" : companyid;
    }

    public void setCompanyid(String companyid) {
        this.companyid = companyid;
    }

    protected GoodsBean(Parcel in) {
        sou = in.readInt();
        pictures = in.createStringArrayList();
        id = in.readString();
        name = in.readString();
        categoryid = in.readString();
        price = in.readString();
        l_price = in.readString();
        sold = in.readString();
        detail = in.readString();
        status = in.readInt();
        addtime = in.readString();
        pic = in.readString();
        ishot = in.readInt();
        p_ruleid = in.readString();
        p_rule_name = in.readString();
        rebate = in.readString();
        profit = in.readString();
        picture = in.readString();
        yun = in.readString();
        share = in.readString();
        store = in.readString();
        hui = in.readString();
        rule_name = in.readString();
        ruleid = in.readString();
        product_rule_id = in.readString();
        total = in.readString();
        num = in.readInt();
    }

    public static final Creator<GoodsBean> CREATOR = new Creator<GoodsBean>() {
        @Override
        public GoodsBean createFromParcel(Parcel in) {
            return new GoodsBean(in);
        }

        @Override
        public GoodsBean[] newArray(int size) {
            return new GoodsBean[size];
        }
    };

    public String getRule_name() {
        return rule_name == null ? "" : rule_name;
    }

    public void setRule_name(String rule_name) {
        this.rule_name = rule_name;
    }

    public String getProduct_rule_id() {
        return product_rule_id == null ? "" : product_rule_id;
    }

    public void setProduct_rule_id(String product_rule_id) {
        this.product_rule_id = product_rule_id;
    }


    public String getTotal() {
        return total == null ? "" : total;
    }

    public void setTotal(String total) {
        this.total = total;
    }

    public int getSou() {
        return sou;
    }

    public void setSou(int sou) {
        this.sou = sou;
    }

    public List<String> getPictures() {
        if (pictures == null) {
            return new ArrayList<>();
        }
        return pictures;
    }

    public void setPictures(List<String> pictures) {
        this.pictures = pictures;
    }

    public String getId() {
        return id == null ? "" : id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name == null ? "" : name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCategoryid() {
        return categoryid == null ? "" : categoryid;
    }

    public void setCategoryid(String categoryid) {
        this.categoryid = categoryid;
    }

    public String getPrice() {
        return price == null ? "" : price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getL_price() {
        return l_price == null ? "" : l_price;
    }

    public void setL_price(String l_price) {
        this.l_price = l_price;
    }

    public String getSold() {
        return sold == null ? "" : sold;
    }

    public void setSold(String sold) {
        this.sold = sold;
    }

    public String getDetail() {
        return detail == null ? "" : detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getAddtime() {
        return addtime == null ? "" : addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    public String getPic() {
        return pic == null ? "" : pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public int getIshot() {
        return ishot;
    }

    public void setIshot(int ishot) {
        this.ishot = ishot;
    }

    public String getP_ruleid() {
        return p_ruleid == null ? "" : p_ruleid;
    }

    public void setP_ruleid(String p_ruleid) {
        this.p_ruleid = p_ruleid;
    }

    public String getP_rule_name() {
        return p_rule_name == null ? "" : p_rule_name;
    }

    public void setP_rule_name(String p_rule_name) {
        this.p_rule_name = p_rule_name;
    }

    public String getRebate() {
        return rebate == null ? "" : rebate;
    }

    public void setRebate(String rebate) {
        this.rebate = rebate;
    }

    public String getProfit() {
        return profit == null ? "" : profit;
    }

    public void setProfit(String profit) {
        this.profit = profit;
    }

    public String getPicture() {
        return picture == null ? "" : picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getYun() {
        return yun == null ? "0.00" : yun;
    }

    public void setYun(String yun) {
        this.yun = yun;
    }

    public String getShare() {
        return share == null ? "" : share;
    }

    public void setShare(String share) {
        this.share = share;
    }

    public String getStore() {
        return store == null ? "" : store;
    }

    public void setStore(String store) {
        this.store = store;
    }

    public String getHui() {
        return hui == null ? "" : hui;
    }

    public void setHui(String hui) {
        this.hui = hui;
    }

    public String getRuleid() {
        return ruleid == null ? "" : ruleid;
    }

    public void setRuleid(String ruleid) {
        this.ruleid = ruleid;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(sou);
        dest.writeStringList(pictures);
        dest.writeString(id);
        dest.writeString(name);
        dest.writeString(categoryid);
        dest.writeString(price);
        dest.writeString(l_price);
        dest.writeString(sold);
        dest.writeString(detail);
        dest.writeInt(status);
        dest.writeString(addtime);
        dest.writeString(pic);
        dest.writeInt(ishot);
        dest.writeString(p_ruleid);
        dest.writeString(p_rule_name);
        dest.writeString(rebate);
        dest.writeString(profit);
        dest.writeString(picture);
        dest.writeString(yun);
        dest.writeString(share);
        dest.writeString(store);
        dest.writeString(hui);
        dest.writeString(rule_name);
        dest.writeString(ruleid);
        dest.writeString(product_rule_id);
        dest.writeString(total);
        dest.writeInt(num);
    }
}
